<?php

/**
 * TarifFournisseur form base class.
 *
 * @method TarifFournisseur getObject() Returns the current form's model object
 *
 * @package    SdCommerce
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseTarifFournisseurForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_fournisseur' => new sfWidgetFormInputHidden(),
      'id_tarif'       => new sfWidgetFormInputHidden(),
      'quantite_min'   => new sfWidgetFormInputText(),
      'quantite_max'   => new sfWidgetFormInputText(),
      'date_debut'     => new sfWidgetFormDate(),
      'date_fin'       => new sfWidgetFormDate(),
      'prix_h_t'       => new sfWidgetFormInputText(),
      'created_at'     => new sfWidgetFormDateTime(),
      'updated_at'     => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id_fournisseur' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id_fournisseur')), 'empty_value' => $this->getObject()->get('id_fournisseur'), 'required' => false)),
      'id_tarif'       => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id_tarif')), 'empty_value' => $this->getObject()->get('id_tarif'), 'required' => false)),
      'quantite_min'   => new sfValidatorNumber(array('required' => false)),
      'quantite_max'   => new sfValidatorNumber(array('required' => false)),
      'date_debut'     => new sfValidatorDate(array('required' => false)),
      'date_fin'       => new sfValidatorDate(array('required' => false)),
      'prix_h_t'       => new sfValidatorNumber(),
      'created_at'     => new sfValidatorDateTime(),
      'updated_at'     => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('tarif_fournisseur[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'TarifFournisseur';
  }

}
